﻿@page "/admin/data"

@attribute [Authorize(Roles = "Admin")]
@inject IHttpService _httpService


<CnGalWebSite.Shared.MasaComponent.Shared.Cards.TitleTip Title="数据概览"/>
    <div class="row">

        @if (IsReady)
        {

            <CnGalWebSite.Shared.MasaComponent.Shared.Components.Charts.MasaLineChart Type="LineChartType.User" Class="mb-4" />

            <CnGalWebSite.Shared.MasaComponent.Shared.Components.Charts.MasaLineChart Type="LineChartType.Entry" Class="mb-4" />
            <CnGalWebSite.Shared.MasaComponent.Shared.Components.Charts.MasaLineChart Type="LineChartType.Article" Class="mb-4" />
            <CnGalWebSite.Shared.MasaComponent.Shared.Components.Charts.MasaLineChart Type="LineChartType.Tag" Class="mb-4" />
            <CnGalWebSite.Shared.MasaComponent.Shared.Components.Charts.MasaLineChart Type="LineChartType.Examine" Class="mb-4" />
            <CnGalWebSite.Shared.MasaComponent.Shared.Components.Charts.MasaLineChart Type="LineChartType.Comment" Class="mb-4" />
            <CnGalWebSite.Shared.MasaComponent.Shared.Components.Charts.MasaLineChart Type="LineChartType.Message" Class="mb-4" />
            <CnGalWebSite.Shared.MasaComponent.Shared.Components.Charts.MasaLineChart Type="LineChartType.File" Class="mb-4" />
            <CnGalWebSite.Shared.MasaComponent.Shared.Components.Charts.MasaLineChart Type="LineChartType.BackUpArchive" Class="mb-4" />

        }
    </div>
@code {
    bool IsReady = false;
    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        await base.OnAfterRenderAsync(firstRender);
        if (firstRender)
        {
            IsReady = true;
            StateHasChanged();
        }
    }
}
